package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ChainInformationMapper;
import com.ruoyi.system.domain.ChainInformation;
import com.ruoyi.system.service.IChainInformationService;

/**
 * 产业链链点信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-09-10
 */
@Service
public class ChainInformationServiceImpl implements IChainInformationService 
{
    @Autowired
    private ChainInformationMapper chainInformationMapper;

    /**
     * 查询产业链链点信息
     * 
     * @param cId 产业链链点信息主键
     * @return 产业链链点信息
     */
    @Override
    public ChainInformation selectChainInformationByCId(Long cId)
    {
        return chainInformationMapper.selectChainInformationByCId(cId);
    }

    /**
     * 查询产业链链点信息列表
     * 
     * @param chainInformation 产业链链点信息
     * @return 产业链链点信息
     */
    @Override
    public List<ChainInformation> selectChainInformationList(ChainInformation chainInformation)
    {
        return chainInformationMapper.selectChainInformationList(chainInformation);
    }

    /**
     * 新增产业链链点信息
     * 
     * @param chainInformation 产业链链点信息
     * @return 结果
     */
    @Override
    public int insertChainInformation(ChainInformation chainInformation)
    {
        chainInformation.setCreateTime(DateUtils.getNowDate());
        return chainInformationMapper.insertChainInformation(chainInformation);
    }

    /**
     * 修改产业链链点信息
     * 
     * @param chainInformation 产业链链点信息
     * @return 结果
     */
    @Override
    public int updateChainInformation(ChainInformation chainInformation)
    {
        chainInformation.setUpdateTime(DateUtils.getNowDate());
        return chainInformationMapper.updateChainInformation(chainInformation);
    }

    /**
     * 批量删除产业链链点信息
     * 
     * @param cIds 需要删除的产业链链点信息主键
     * @return 结果
     */
    @Override
    public int deleteChainInformationByCIds(Long[] cIds)
    {
        return chainInformationMapper.deleteChainInformationByCIds(cIds);
    }

    /**
     * 删除产业链链点信息信息
     * 
     * @param cId 产业链链点信息主键
     * @return 结果
     */
    @Override
    public int deleteChainInformationByCId(Long cId)
    {
        return chainInformationMapper.deleteChainInformationByCId(cId);
    }
}
